package com.xcity.pomelo.response;

import com.xcity.db.entity.Player;
import com.xcity.game.buildv2.BuildV2;
import com.xcity.game.buildv2.BuildV2.State;
import com.xcity.game.buildv2.BuildV2Part;
import com.xcity.pomelo.response.BuildV2Response.Part;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class BuildV2PartLevelUpResponse extends Response {
	
	public int id;
	public State state;
	public Part part;
	
	public BuildV2PartLevelUpResponse() {
		super(CODE_ERROR);
	}
	
	public BuildV2PartLevelUpResponse(int serial, Player player, BuildV2 building, BuildV2Part part) {
		super(serial);
		this.id = building.getId();
		this.state = building.getState();
		this.part = new Part(player, part);
	}

}
